package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Result;
import org.jsola.hr.dto.HrMessageDTO;
import org.jsola.message.dto.ShortMessageDTO;
import org.jsola.message.dto.ShortMessagesDTO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@Api(tags = "hr-短信发送/校验相关")
public interface ISendControllerAPI {
    /**
     * 发送短信
     *
     * @param shortMessageDTO 短信信息
     * @return 成功/失败
     */
    @ApiOperation(value = "发送短信")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shortMessageDTO", dataType = "ShortMessageDTO", value = "短信信息", paramType = "body")
    })
    Result<Boolean> sendShortMessage(@RequestBody @Validated HrMessageDTO shortMessageDTO);


    /**
     * 校验验证码
     *
     * @param shortMessageDTO 短信信息
     * @return 成功/失败
     */
    @ApiOperation(value = "校验验证码")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shortMessageDTO", value = "短信信息", dataType = "ShortMessageDTO", paramType = "body")
    })
    Result<Boolean> verifyCaptcha(@RequestBody HrMessageDTO shortMessageDTO);

}
